package jingdong;

import java.util.Scanner;

/**
 * @author Hang
 * @date 2022/8/27
 * @project AutumnOffer
 * @description
 **/
public class Solution3 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        if(n < 6) {
            System.out.println(0);
            return;
        }
        long dp[] = new long[n-5];
        dp[0] = 1;
        long pow = 26;
        for(int i=1;i<=n-6;i++){
            long sum =0;
            sum = (dp[i-1]*26+(i+1)*pow)%1000000007;
            dp[i] = sum;
            pow *= 26;
        }
        System.out.println(dp[n-6]);
    }
}
